<!--
  features: 有两个按钮的dialog
  author: lal
  date: 2020-02-09
  tip: 类似于alert的功能
-->

<template>
  <v-dialog v-model="dialog" persistent max-width="290">
    <v-card>
      <v-card-title class="headline">{{ title }}</v-card-title>
      <slot name="content">
          <p class="ma-2"></p>
      </slot>
      <!-- <v-row
        class="fill-height ma-0"
        align="center"
        justify="center"
        v-show = "user_id == '' && dialogType == 'userid'"
      >
        <v-progress-circular
              indeterminate
              color="green"
        ></v-progress-circular>
      </v-row>

      <v-row class="body-1 fill-height ma-0"  v-show="dialogType == 'xj'" >
          <p class="ma-2">用户已付款请点击确认按钮</p>
      </v-row> -->
      <!-- <v-card-text>确定删除该商品吗？</v-card-text> -->
      <v-card-actions>
        <v-spacer></v-spacer>
        <v-btn color="green darken-1" text @click="dialogSureFn">{{ suretext }}</v-btn>
        <v-btn color="green darken-1" text @click="dialogCancelFn">{{ canceltext }}</v-btn>
      </v-card-actions>
    </v-card>
  </v-dialog>

</template>

<script>
  export default{
    props:{
      title:{
        type:String,
        default:"准备中",
      },
      dialog:{
        type:Boolean,
        default:false
      },
      suretext:{
        type:String,
        default:"确定",
      },
      canceltext:{
        type:String,
        default:"取消"
      }
    },
    methods:{
      dialogSureFn(){
        this.$emit("sureFn")
      },
      dialogCancelFn(){
        this.$emit("cancelFn")
      }
    }
  }
</script>

<style>
</style>
